// 引包
var experess = require('express')
var bodyParser = require('body-parser')

var app = experess()

app.engine('html', require('express-art-template'))

app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())

app.get('/', function(req, res) {
    res.render('index.html')
})

app.post('/post', function(req, res) {
    console.log(req.body);
    res.end(JSON.stringify(req.body))
})

app.listen(3000, function() {
    console.log('express app is runing...')
})